<template>
	<!-- #ifdef H5 -->
	<view class="h5-header">
		<view class="header-title">
			<view v-if="combakflag" class="icon-box">
				<u-icon name="arrow-left" color="#45bc1b" size="26" @click="combak"></u-icon>
			</view>
			<view v-if="lang" class="combak">
				<Lang></Lang>
			</view>
			<view class="title">
				<view class="title-content">{{title}}</view>
			</view>
			<view class="right">
				<view class="icon-box" @click="changeMobile('17690927591')" v-if="mobile!=false">
					<u-icon name="server-fill" color="#45bc1b" size="26"></u-icon>
				</view>
			</view>
		</view>
		<view class="bottom-box" v-if="bottom"></view>
	</view>
	<!-- #endif -->
</template>

<script>
	import Lang from "./Lang.vue"
	export default {
		name: "HeaderTitle",
		props: ['title', 'bottom', 'lang', 'combakflag', 'mobile'],
		components: {
			Lang
		},
		data() {
			return {

			};
		},
		methods: {
			changeMobile(mobile) {
				uni.makePhoneCall({
					phoneNumber: mobile
				})

			},
			combak() {
				uni.navigateBack();
			},
		}
	}
</script>

<style lang="scss" scoped>
	.header-title {
		width: 100%;
		height: 100rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		color: $uni-color-title;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 99;
		box-sizing: border-box;
		padding: 20rpx;
		font-size: $uni-font-size-lg;
		background-color: $uni-bg-color;
	}

	.title {
		width: 100%;
		box-sizing: border-box;
		position: absolute;
		left:0%;
		display: flex;
		justify-content: center;
		align-items: center;
		pointer-events: none;
		.title-content{
			width:70%;
			overflow:hidden;
			display: flex;
			justify-content: center;
			padding: 10rpx 0rpx;
			
		}
	}

	.icon-box {
		padding: 15rpx;
		background-color: $uni-bg-color-box;
		box-shadow: $uni-bg-shadow;
		border-radius: $uni-border-radius-lg;
	}

	.bottom-box {
		width: 100%;
		height: 100rpx;
	}
</style>